#!/bin/bash
#----------------------------------------------------
#               入口菜单
#----------------------------------------------------
source ./Checkuser
checkuser
source ./Install
source ./Optimization
source ./Other_Items
source ./Initialization
Entry_Menu_Bar(){
    OPTION=$(whiptail --title "自动部署" --menu "请选择想要操作的菜单，回车立即进入！" 30 60 6  \
    "1" "安装(Install service)" \
    "2" "初始化(Initialization)" \
    "3" "优化(Optimization)" \
    "4" "其他(Others_Items)"  3>&1 1>&2 2>&3 )

    case $OPTION in
    1)
        Install
        ;;
    2)
        Initialization
        ;;
    3)
        Optimization
        ;;
    4)
        Other_Items
        ;;
    *) 
        echo "You chose Cancel."
        ;;
    esac
}

#调用入口菜单栏
Entry_Menu_Bar
